package com.xbongbong.pro.appdetail.pojo;

import com.xbongbong.paas.domain.entity.ext.ConditionsEntityExt;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;


/**
 * 移动端详情金额区块信息
 *
 * @author GuoJun.HU
 * @date 2019/3/13 18:29
 * @since V1.0
 */
@ToString
@Getter
@Setter
public class MobileDetailMoneyItemPojo {

    /**
     * 显示的名称
     * 如：和同金额
     */
    private String name;
    /**
     * 显示的值
     * 如：10000
     */
    private Object value;
    /**
     * 只塞入传参条件，不会传跳转链接，如果为空或null，则不跳转
     */
    private String through;
    /**
     * 是否跳转
     */
    private boolean jumpFlag;
    /**
     * 业务类型
     */
    private Integer businessType;
    /**
     * saas标记，1saas，2paas
     */
    private Integer saasMark;
    /**
     * 业务类型
     */
    private Integer distributorMark;
    /**
     * 封装的查询参数（数据汇总跳转用）
     */
    private List<ConditionsEntityExt> conditions;

    public MobileDetailMoneyItemPojo(String name, Object value, boolean jumpFlag) {
        this.name = name;
        this.value = value;
        this.jumpFlag = jumpFlag;
    }

    public MobileDetailMoneyItemPojo(Integer distributorMark, String name, Object value, boolean jumpFlag) {
        this.name = name;
        this.value = value;
        this.jumpFlag = jumpFlag;
        if (jumpFlag) {
            //穿透的才需要经销商标识
            this.distributorMark = distributorMark;
        }
    }

    public MobileDetailMoneyItemPojo(String name, Object value, List<ConditionsEntityExt> conditions, boolean jumpFlag, Integer businessType, Integer saasMark) {
        this.name = name;
        this.value = value;
        this.conditions = conditions;
        this.jumpFlag = jumpFlag;
        this.businessType = businessType;
        this.saasMark = saasMark;
    }

    public MobileDetailMoneyItemPojo(Integer distributorMark, String name, Object value, List<ConditionsEntityExt> conditions, boolean jumpFlag, Integer businessType, Integer saasMark) {
        this.name = name;
        this.value = value;
        this.conditions = conditions;
        this.jumpFlag = jumpFlag;
        if (jumpFlag) {
            this.distributorMark = distributorMark;
        }
        this.businessType = businessType;
        this.saasMark = saasMark;
    }

    public MobileDetailMoneyItemPojo(String name, String value, String through, boolean jumpFlag) {
        this.name = name;
        this.value = value;
        this.through = through;
        this.jumpFlag = jumpFlag;
    }
}
